package com.imooc.utils;

import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;

public class ValidateUtil {
	
	
	private static final String MOBILE_PATTERN = "^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";
	
	//校验手机号码
	public static boolean isMobile(String mobile){
		if(StringUtils.isEmpty(mobile)){
			return false;
		}
		return Pattern.matches(MOBILE_PATTERN, mobile);
	}

	
	
	
	public static void main(String[] args) {
		System.out.println(isMobile("18700992530"));
	}
}
